﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace studentform
{
    public partial class Form1 : Form
    {
        Studentform stu = new Studentform();
        public Form1()
        {
            InitializeComponent();
        }

        private void btnsubmit_Click(object sender, EventArgs e)
        {
            stu.Meng = Convert.ToInt32(txtEng.Text);
            stu.Mjava = Convert.ToInt32(txtJava.Text);
            stu.Mmaths = Convert.ToInt32(txtMaths.Text);
            stu.Mpt = Convert.ToInt32(txtPt.Text);
            stu.Msci = Convert.ToInt32(txtSci.Text);

            lbltotal.Text = stu.add();

            stu.Mrollno = Convert.ToInt32(txtrollno.Text);
            stu.MName  = txtName.Text;
            int rollno = stu.Mrollno;
            string name = stu.MName;
            MessageBox.Show("roll no :"+rollno+" Name: "+name);
        }
    }
}

        

        

        
    

